﻿using iTextSharp.text;
using iTextSharp.text.pdf;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ThoughtWorks.QRCode.Codec;

namespace ConsoloWin.model
{
    public class Twomodel
    {
        /// <summary>
        /// 火化证明
        /// </summary>
        public static void OneRunTime()
        {
            BaseFont fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            Font fontFamily1_1 = new Font(fontFamily1, 22, Font.NORMAL);
            Font fontFamily1_2 = new Font(fontFamily1, 9, Font.BOLD);
            Font fontFamily1_3 = new Font(fontFamily1, 13, Font.NORMAL);
            Font fontFamily1_4 = new Font(fontFamily1, 12, Font.NORMAL);
            Font fontFamily1_5 = new Font(fontFamily1, 12, Font.UNDERLINE);
            Font fontFamily1_6 = new Font(fontFamily1, 16, Font.BOLD);
            string strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            Document document = new Document(new RectangleReadOnly(595f, 420f), 37, 37, 30, 0);
            PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            document.Open();

            float[] headerwidths = null;
            PdfPTable aTable = null;
            Rectangle r = null;
            PdfPCell ppcell = null;
            PdfPCell tdTmp = null;
            float MinimumHeight = 25.0f;


            #region 条形码
            headerwidths = new float[] { 30, 30 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(60, 0);
            aTable.SetWidthPercentage(headerwidths, r);
            PdfContentByte cd = writer.DirectContent;
            Barcode128 code128 = new Barcode128();
            code128.X = 1f;
            code128.N = 1f;
            code128.Size = 15f;
            code128.Baseline = 12;
            code128.BarHeight = 40f;
            code128.Code = "";
            iTextSharp.text.Image image128 = code128.CreateImageWithBarcode(cd, null, null);
            ppcell = new PdfPCell(image128, false);
            ppcell.FixedHeight = 40;
            ppcell.BorderWidth = 0;
            //ppcell.BorderColor = ;
            ppcell.VerticalAlignment = Element.ALIGN_MIDDLE;
            aTable.AddCell(ppcell);

            tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);
            document.Add(aTable);
            #endregion

            Paragraph p1 = new Paragraph();
            p1.Leading = 23.0f;
            p1.Add(new Phrase("               遗体火化证明 ", fontFamily1_1));
            p1.Add(new Phrase("殡仪馆NO.SY20200301004", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Leading = 30.0f;
            p1.Add(new Phrase(" ", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 25.0f;
            p1.Add(new Phrase("     逝者", fontFamily1_4));
            p1.Add(new Phrase("                ", fontFamily1_5));
            p1.Add(new Phrase("性别", fontFamily1_4));
            p1.Add(new Phrase("                  ", fontFamily1_5));
            p1.Add(new Phrase("身份证号", fontFamily1_4));
            p1.Add(new Phrase("                ", fontFamily1_5));
            p1.Add(new Phrase("于", fontFamily1_4));
            p1.Add(new Phrase("    2022-12-12     ", fontFamily1_5));
            p1.Add(new Phrase("死亡，单位（住址）：", fontFamily1_4));
            p1.Add(new Phrase("                ", fontFamily1_5));
            p1.Add(new Phrase("遗体于", fontFamily1_4));
            p1.Add(new Phrase("                ", fontFamily1_5));
            p1.Add(new Phrase("在我馆火化。", fontFamily1_4));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 25.0f;
            p1.Add(new Phrase("     本证明中“死亡时间”取自非民政部门开具的“死亡证明”，仅提供参考，特此证明。", fontFamily1_4));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_RIGHT;
            p1.Leading = 32.0f;
            p1.Add(new Phrase($"绍兴市上虞区殡仪馆日", fontFamily1_4));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Leading = 30.0f;
            p1.Add(new Phrase(" ", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_RIGHT;
            p1.Leading = 25.0f;
            p1.Add(new Phrase($"打印日期：{DateTime.Now.Year.ToString()}年{DateTime.Now.Month.ToString()}月{DateTime.Now.Day.ToString()}日", fontFamily1_4));
            document.Add(p1);

            PdfContentByte cba = writer.DirectContentUnder;
            string syurl = "c:/users/zdf/desktop/pdf/pdf/殡仪馆火化章.png";
            iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(syurl);
            image.ScaleAbsolute(new Rectangle(100, 100));
            image.RotationDegrees = 30;//旋转角度
            PdfGState gs = new PdfGState();
            gs.FillOpacity = 0.7f;//透明度
            cba.SetGState(gs);
            image.SetAbsolutePosition(410, 90);
            cba.AddImage(image);

            document.Close();
            writer.Close();

            #region
            //Paragraph p1 = new Paragraph();
            //p1.Leading = 28.0f;
            //p1.Add(new Phrase("               遗体火化证明 ", fontFamily1_1));
            //p1.Add(new Phrase("殡仪馆NO.20220001", fontFamily1_3));
            //document.Add(p1);

            //headerwidths = new float[] { 16, 17, 9, 17, 15, 48 };
            //aTable = new PdfPTable(headerwidths);
            //r = new Rectangle(120, 0);
            //aTable.SetWidthPercentage(headerwidths, r);

            //p1 = new Paragraph();
            //p1.Leading = 40.0f;
            //p1.Add(new Phrase("   ", fontFamily1_4));
            //document.Add(p1);

            //tdTmp = new PdfPCell(new Phrase("逝者", fontFamily1_4));
            //tdTmp.Padding = 5.0f;
            //tdTmp.PaddingBottom = 1.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("AAAA", fontFamily1_4));
            //tdTmp.Padding = 5.0f;
            //tdTmp.PaddingBottom = 1.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //tdTmp.BorderWidthBottom = 1;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("性别", fontFamily1_4));
            //tdTmp.Padding = 5.0f;
            //tdTmp.PaddingBottom = 1.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_4));
            //tdTmp.Padding = 5.0f;
            //tdTmp.PaddingBottom = 1.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //tdTmp.BorderWidthBottom = 1;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("身份证号", fontFamily1_4));
            //tdTmp.Padding = 5.0f;
            //tdTmp.PaddingBottom = 1.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("430822199805251396", fontFamily1_4));
            //tdTmp.Padding = 5.0f;
            //tdTmp.PaddingBottom = 1.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //tdTmp.BorderWidthBottom = 1;
            //aTable.AddCell(tdTmp);
            //document.Add(aTable);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_LEFT;
            //p1.Leading = 25.0f; ;
            //p1.Add(new Phrase(" 于", fontFamily1_4));
            //p1.Add(new Phrase("      ", fontFamily1_5));
            //p1.Add(new Phrase("死亡，单位(住址)：", fontFamily1_4));
            //p1.Add(new Phrase("       ", fontFamily1_5));
            //p1.Add(new Phrase("遗体于", fontFamily1_4));
            //p1.Add(new Phrase("         ", fontFamily1_5));
            //p1.Add(new Phrase("在我馆火化。", fontFamily1_4));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Leading = 28.0f;
            //p1.FirstLineIndent = 26.0f;
            //p1.Add(new Phrase("本证明中“死亡时间”取自非民政部门开具的“死亡证明”，仅提供参考，特此证明。", fontFamily1_4));
            //p1.ExtraParagraphSpace = 0;
            //document.Add(p1);


            //p1 = new Paragraph();
            //p1.Leading = 35.0f;
            //p1.FirstLineIndent = 375.0f;
            //p1.Add(new Phrase("绍兴市上虞区殡仪馆", fontFamily1_4));
            //p1.ExtraParagraphSpace = 0;
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Leading = 60.0f;
            //p1.FirstLineIndent = 345.0f;
            //p1.Add(new Phrase($"打印日期: {DateTime.Now.Year.ToString()}年{DateTime.Now.Month.ToString()}月{DateTime.Now.Day.ToString()}日", fontFamily1_4));
            //p1.ExtraParagraphSpace = 0;
            //document.Add(p1);

            ////水印文件地址

            #endregion

            #region
            //p1 = new Paragraph();
            //p1.Leading = 50.0f;
            //p1.FirstLineIndent = 26.0f;
            //p1.Add(new Phrase("逝者", fontFamily1_4));
            //p1.Add(new Phrase("            ", fontFamily1_5));
            //p1.Add(new Phrase("性别", fontFamily1_4));
            //p1.Add(new Phrase("           ", fontFamily1_5));
            //p1.Add(new Phrase("身份证号", fontFamily1_4));
            //p1.Add(new Phrase("                               ", fontFamily1_5));
            //p1.ExtraParagraphSpace = 0;
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Leading = 28.0f;
            //p1.Add(new Phrase("特此证明。", fontFamily1_4));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Leading = 28.0f;
            //p1.Add(new Phrase("绍兴市上虞区殡仪馆", fontFamily1_4));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Leading = 28.0f;
            //p1.Add(new Phrase("打印日期：", fontFamily1_4));
            //p1.Add(new Phrase($"{DateTime.Now.Year.ToString()}年{DateTime.Now.Month.ToString()}月{DateTime.Now.Day.ToString()}日", fontFamily1_4));
            //document.Add(p1);

            //Paragraph p1 = new Paragraph();
            //p1.Alignment = Element.TITLE;
            //p1.Leading = 65.0f;
            //p1.Add(new Phrase("  ", fontFamily1_1));
            //document.Add(p1);

            //headerwidths = new float[] { 10, 20, 5, 10, 10, 10, 17, 30 };
            //aTable = new PdfPTable(headerwidths);
            //r = new Rectangle(120, 0);
            //aTable.SetWidthPercentage(headerwidths, r);

            //tdTmp = new PdfPCell(new Phrase("AAAAAAAA", fontFamily1_3));
            ////tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            ////tdTmp.Border = 1;
            ////tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("AAAAAAAA", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);


            //tdTmp = new PdfPCell(new Phrase("火化炉类型", fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);
            //document.Add(aTable);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_LEFT;
            //p1.Leading = 10.0f;
            //p1.Add(new Phrase("AAAAAAAA", fontFamily1_3));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_RIGHT;
            //p1.Leading = 35.0f;
            //p1.Add(new Phrase(DateTime.Now.Year.ToString() + "      " + DateTime.Now.Month + "    " + DateTime.Now.Day + "      ", fontFamily1_3));
            //document.Add(p1);




            //headerwidths = new float[] { 10, 20, 5, 10, 10, 10, 17, 30 };
            //aTable = new PdfPTable(headerwidths);
            //r = new Rectangle(120, 0);
            //aTable.SetWidthPercentage(headerwidths, r);


            //tdTmp = new PdfPCell(new Phrase("火化炉类型", fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);
            //document.Add(aTable);
            #endregion
        }

        /// <summary>
        /// 
        /// </summary>
        public static void TwoRuntime()
        {
            float[] headerwidths;
            PdfPTable aTable;
            Rectangle r;
            PdfPCell ppcell;
            PdfPCell tdTmp;
            PdfContentByte cd;
            Barcode128 code128;
            QRCodeEncoder qrCodeEncoder;
            System.Drawing.Bitmap codeImage;
            iTextSharp.text.Image imglift;
            BaseFont fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            Font fontFamily1_1 = new Font(fontFamily1, 18, Font.BOLD);
            Font fontFamily1_2 = new Font(fontFamily1, 9, Font.BOLD);
            Font fontFamily1_3 = new Font(fontFamily1, 12, Font.BOLD);
            Font fontFamily1_4 = new Font(fontFamily1, 18, Font.BOLD);
            Font fontFamily1_5 = new Font(fontFamily1, 12, Font.UNDERLINE);
            Font fontFamily1_6 = new Font(fontFamily1, 16, Font.BOLD);
            string strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            Document document = new Document(PageSize.A4, 40, 40, 20, 421);
            PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            writer.InitialLeading = 30.0f;
            //writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            document.Open();
            headerwidths = new float[] { 10, 10 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(20, 0);
            ppcell = new PdfPCell();
            tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));
            //!string.IsNullOrEmpty(fULREG.REGBUSNUM)
            if (true)
            {
                #region 条形码
                cd = writer.DirectContent;
                code128 = new Barcode128();
                code128.X = 1f;
                code128.N = 1f;
                code128.Size = 15f;
                code128.Baseline = 12;
                code128.BarHeight = 45f;
                code128.Code = "1211412121231231";
                //code128.Code = "1244114424348394923";
                iTextSharp.text.Image image128 = code128.CreateImageWithBarcode(cd, null, null);
                //image128.SetDpi(300, 300);
                headerwidths = new float[] { 30, 30, 30 };
                aTable = new PdfPTable(headerwidths);
                r = new Rectangle(90, 0);
                aTable.SetWidthPercentage(headerwidths, r);
                ppcell = new PdfPCell(image128, false);
                ppcell.FixedHeight = 50;
                ppcell.BorderWidth = 0;
                //ppcell.BorderColor = ;
                ppcell.VerticalAlignment = Element.ALIGN_MIDDLE;
                aTable.AddCell(ppcell);


                tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));
                tdTmp.Padding = 8.0f;
                tdTmp.BorderWidth = 0;
                aTable.AddCell(tdTmp);

                #endregion

                #region 二维码
                ppcell = new PdfPCell(new Phrase("12233", fontFamily1_2));
                ppcell.FixedHeight = 50;
                ppcell.BorderWidth = 0;
                //ppcell.BorderColor = ;
                ppcell.VerticalAlignment = Element.ALIGN_MIDDLE;
                ppcell.HorizontalAlignment = Element.ALIGN_RIGHT;
                aTable.AddCell(ppcell);
                document.Add(aTable);
                #endregion

            }

            Paragraph p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 20.0f;
            p1.Add(new Phrase("绍兴市上虞区殡仪馆火化通知单", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 30.0f;
            p1.Add(new Phrase(" ", fontFamily1_1));
            document.Add(p1);

            float MinimumHeight = 25.0f;
            headerwidths = new float[] { 25, 20, 15, 15, 15, 15, 15 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(120, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("遗体姓名", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("1245454544", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("性别", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadasdasda", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("年龄", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("2ewqeqwewdasd", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("证件号码", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadasda", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("户籍地址", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadasdasdas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("接运地址", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);
            //string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3
            tdTmp = new PdfPCell(new Phrase("sdasdsadasda", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 6;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("火化炉型", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Rowspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadasdasdda", fontFamily1_4));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2; tdTmp.Rowspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("火化日期", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadasdsdasda", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("火化炉号", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("殡仪服务员签字", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = 50;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = 50;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("备注", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = 50;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadasda", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 4;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = 50;
            aTable.AddCell(tdTmp);
            document.Add(aTable);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 15.0f;
            p1.Add(new Phrase(" ", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase("  家属或被委托人签字：                          经办人：" + "dasdasdsad", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_RIGHT;
            p1.Leading = 15.0f;
            p1.Add(new Phrase("dsadsadasdasdasdad", fontFamily1_3));
            document.Add(p1);

            document.Close();
            writer.Close();
        }

        /// <summary>
        /// 费用清单
        /// </summary>
        public static void ThreeRunTime()
        {
            #region 新版
            BaseFont fontFamily1;
            Font fontFamily1_1;
            Font fontFamily1_2;
            Font fontFamily1_3;
            Font fontFamily1_4;
            Font fontFamily1_5;
            Font fontFamily1_6;
            Font fontFamily1_7;
            Paragraph p1;
            float[] headerwidths;
            PdfPTable aTable;
            Rectangle r;
            PdfPCell tdTmp;
            Document document;
            PdfWriter writer;
            Rectangle pageSize;

            #region 上虞  新版
            fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            fontFamily1_1 = new Font(fontFamily1, 14, Font.NORMAL);
            fontFamily1_2 = new Font(fontFamily1, 9, Font.BOLD);
            fontFamily1_3 = new Font(fontFamily1, 10, Font.NORMAL);
            fontFamily1_4 = new Font(fontFamily1, 8, Font.NORMAL);
            fontFamily1_5 = new Font(fontFamily1, 11, Font.UNDERLINE);
            fontFamily1_6 = new Font(fontFamily1, 16, Font.BOLD);

            string strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            document = new Document(PageSize.A4, 28, 28, 15, 421);
            writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            //writer.InitialLeading = 30.0f;
            //writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            document.Open();

            p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 12.0f;
            //SessionDevice.ClientInfo.CompanyName
            p1.Add(new Phrase("上虞区收费清单", fontFamily1_1));
            document.Add(p1);



            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 4.0f;
            p1.Add(new Phrase("   ", fontFamily1_4));
            document.Add(p1);

            headerwidths = new float[] { 69, 6, 15 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(90, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase($"序号: {"xxxxxxx"}                         收款日期：{"xxxxxxx"}", fontFamily1_4));
            tdTmp.Padding = 0.0f;
            tdTmp.MinimumHeight = 9.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.BorderWidth = 0;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"绍兴市上虞区殡仪馆", fontFamily1_4));
            tdTmp.Padding = 0.0f;
            tdTmp.MinimumHeight = 9.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.Colspan = 2;
            tdTmp.Border = 0;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"逝者姓名：{"xxxxxxx"}       性别：{"xxxxxxx"}     年龄：{"xxxxxxx"}      身份证号：{"xxxxxxx"}   户籍地址：{"xxxxxxx"}", fontFamily1_4));
            tdTmp.Padding = 0.0f;
            tdTmp.MinimumHeight = 9.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.BorderWidth = 0;
            tdTmp.Colspan = 3;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"经办人姓名：{"xxxxxxx"}    经办人身份证号：{"xxxxxxx"}   与死者关系：{"xxxxxxx"}   联系电话：{"xxxxxxx"}", fontFamily1_4));
            tdTmp.Padding = 0.0f;
            tdTmp.MinimumHeight = 9.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.BorderWidth = 0;
            tdTmp.Colspan = 2;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"打印日期：{"xxxxxxx"}", fontFamily1_4));
            tdTmp.Padding = 0.0f;
            tdTmp.PaddingRight = 2.0f;
            tdTmp.MinimumHeight = 9.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            tdTmp.BorderWidth = 0;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"经办人户籍地址：{"xxxxxxx"}", fontFamily1_4));
            tdTmp.Padding = 0.0f;
            tdTmp.MinimumHeight = 9.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.BorderWidth = 0;
            tdTmp.Colspan = 2;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"经办：{"xxxxxxx"}", fontFamily1_4));
            tdTmp.Padding = 0.0f;
            tdTmp.PaddingRight = 2.0f;
            tdTmp.MinimumHeight = 9.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            tdTmp.BorderWidth = 0;
            aTable.AddCell(tdTmp);

            document.Add(aTable);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 4.0f;
            p1.Add(new Phrase("   ", fontFamily1_4));
            document.Add(p1);
            #endregion

            #region 第二联
            headerwidths = new float[] { 3, 19, 3, 5, 3, 6, 6, 3, 19, 3, 5, 3, 6, 6 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(90, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            for (var i = 0; i < 2; i++)
            {
                tdTmp = new PdfPCell(new Phrase("序号", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("费用名称", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("单位", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("单价", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("数量", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("减免金额", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("实收金额", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);
            }
            int number = 0;
            for (var i = 0; i < 30; i++)
            {
                number++;
                tdTmp = new PdfPCell(new Phrase($"{number}", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("我我我我我我我我我我我我我我", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("知我", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("1234.00", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("12", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("1234.000", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase("1234.000", fontFamily1_4));
                tdTmp.Padding = 0.0f;
                tdTmp.MinimumHeight = 18.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);
            }

            document.Add(aTable);

            headerwidths = new float[] { 21, 21, 16, 16, 16 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(90, 0);
            aTable.SetWidthPercentage(headerwidths, r);


        
            tdTmp = new PdfPCell(new Phrase($"  基本收费合计：{"12345.00"}", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 23.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.BorderWidthRight = 0;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"延申收费合计：{"12345.00"}", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 23.0f;
            tdTmp.PaddingLeft = 3.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.BorderWidthRight = 0;
            tdTmp.BorderWidthLeft = 0;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"应收：{"12345.00"}", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 23.0f;
            tdTmp.PaddingLeft = 3.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.BorderWidthRight = 0;
            tdTmp.BorderWidthLeft = 0;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"减免：{"12345.00"}", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 23.0f;
            tdTmp.PaddingLeft = 3.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.BorderWidthRight = 0;
            tdTmp.BorderWidthLeft = 0;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase($"实收：{"12345.00"}", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 23.0f;
            tdTmp.BorderWidthLeft = 0;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            document.Add(aTable);
            #endregion

            #region 第四联
            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 1.0f;
            p1.Add(new Phrase("   ", fontFamily1_4));
            document.Add(p1);

            headerwidths = new float[] { 45, 45 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(90, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("温馨提示：凭此联清单及相应发票领取骨灰。", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 1.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.Border = 0;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("经核对，同意以上服务收费。家属签字：", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.PaddingLeft = 55.0f;
            tdTmp.MinimumHeight = 1.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.Border = 0;
            aTable.AddCell(tdTmp);

            document.Add(aTable);

            PdfContentByte cba = writer.DirectContentUnder;
            string syurl = $"c:/users/zdf/desktop/pdf/pdf/殡仪馆火化章.png";
            iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(syurl);
            image.ScaleAbsolute(new Rectangle(90, 90));
            image.RotationDegrees = 30;//旋转角度
            PdfGState gs = new PdfGState();
            gs.FillOpacity = 0.7f;//透明度
            cba.SetGState(gs);
            image.SetAbsolutePosition(430, 720);
            cba.AddImage(image);
            #endregion
            document.Close();
            writer.Close();
            #endregion
        }

        /// <summary>
        /// 出车单
        /// </summary>
        public static void FourRuntime()
        {
            BaseFont fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            Font fontFamily1_1 = new Font(fontFamily1, 22, Font.NORMAL);
            Font fontFamily1_2 = new Font(fontFamily1, 9, Font.BOLD);
            Font fontFamily1_3 = new Font(fontFamily1, 13, Font.NORMAL);
            Font fontFamily1_4 = new Font(fontFamily1, 12, Font.NORMAL);
            Font fontFamily1_5 = new Font(fontFamily1, 12, Font.UNDERLINE);
            Font fontFamily1_6 = new Font(fontFamily1, 16, Font.BOLD);


            float MinimumHeight = 25.0f;
            float fMinimumHeight = 18;

            float[] headerwidths = null;
            PdfPTable aTable = null;
            Rectangle r = null;
            PdfPCell ppcell = null;
            PdfPCell tdTmp = null;
            Paragraph p1 = new Paragraph();

            string strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            Document document = new Document(PageSize.A4, 55, 55, 50, 421);
            PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            writer.InitialLeading = 30.0f;
            writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            document.Open();

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_CENTER;
            p1.Leading = 10.0f;
            p1.Add(new Phrase("" + "绍兴市上虞区殡仪馆" + "接运单", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase("                    ", fontFamily1_4));
            document.Add(p1);

            if (true)
            {
                #region 条形码
                PdfContentByte cd = writer.DirectContent;
                Barcode128 code128 = new Barcode128();
                code128 = new Barcode128();
                code128.X = 2f;
                code128.N = 2f;
                code128.Size = 20f;
                code128.Baseline = 20;
                code128.BarHeight = 40f;
                code128.Code = "231232131432423";

                iTextSharp.text.Image image128 = code128.CreateImageWithBarcode(cd, null, null);
                //image128.SetDpi(300, 300);
                headerwidths = new float[] { 120 };
                aTable = new PdfPTable(headerwidths);
                r = new Rectangle(120, 0);
                aTable.SetWidthPercentage(headerwidths, r);

                tdTmp = new PdfPCell(new Phrase("", fontFamily1_4));
                tdTmp.Padding = 10.0f;
                tdTmp.BorderWidth = 0;
                aTable.AddCell(tdTmp);

                ppcell = new PdfPCell(image128, false);
                ppcell.FixedHeight = 40;
                ppcell.BorderWidth = 0;
                ppcell.HorizontalAlignment = Element.ALIGN_CENTER;
                ppcell.VerticalAlignment = Element.ALIGN_MIDDLE;
                aTable.AddCell(ppcell);
                document.Add(aTable);
                #endregion
            }

            headerwidths = new float[] { 20, 20, 20, 20, 20, 20 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(120, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("逝者姓名", fontFamily1_4));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    qqqq      ", fontFamily1_4));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("性别", fontFamily1_2));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("      aaaa     ", fontFamily1_4));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("年龄", fontFamily1_4));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" dadasdasda", fontFamily1_4));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("死亡日期", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("     qewdas     ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("死亡原因", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  aaaaa  ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 3;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系人1", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("      ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系人1电话", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  aaaa ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 3;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系人2", fontFamily1_4));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadasdas", fontFamily1_4));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系人2电话", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("      ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 3;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("接尸时间", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  asdsdas   ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("接尸地址", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  aa   ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("驾驶员", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    aa  ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("车牌号", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  aaa  ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("公里数", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  aaa  ", fontFamily1_4));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" 备注：" + "dasdasdasdasdada", fontFamily1_4));
            tdTmp.Padding = 3.0f; tdTmp.MinimumHeight = 30;
            tdTmp.Colspan = 6;
            tdTmp.VerticalAlignment = Element.ALIGN_CENTER;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);
            document.Add(aTable);

            document.Close();
            writer.Close();
        }


        /// <summary>
        /// 火化通知单
        /// </summary>
        public static void FilvRunTime()
        {
            float[] headerwidths;
            PdfPTable aTable;
            Rectangle r;
            PdfPCell ppcell;
            PdfPCell tdTmp;
            PdfContentByte cd;
            Barcode128 code128;
            QRCodeEncoder qrCodeEncoder;
            System.Drawing.Bitmap codeImage;
            iTextSharp.text.Image imglift;
            BaseFont fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            Font fontFamily1_1 = new Font(fontFamily1, 18, Font.BOLD);
            Font fontFamily1_2 = new Font(fontFamily1, 9, Font.BOLD);
            Font fontFamily1_3 = new Font(fontFamily1, 12, Font.BOLD);
            Font fontFamily1_4 = new Font(fontFamily1, 18, Font.BOLD);
            Font fontFamily1_5 = new Font(fontFamily1, 12, Font.UNDERLINE);
            Font fontFamily1_6 = new Font(fontFamily1, 16, Font.BOLD);
            string strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            Document document = new Document(PageSize.A4, 40, 40, 20, 421);
            PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            writer.InitialLeading = 30.0f;
            //writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            document.Open();
            headerwidths = new float[] { 10, 10 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(20, 0);
            ppcell = new PdfPCell();
            tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));
            //!string.IsNullOrEmpty(fULREG.REGBUSNUM)
            if (true)
            {
                #region 条形码
                cd = writer.DirectContent;
                code128 = new Barcode128();
                code128.X = 1f;
                code128.N = 1f;
                code128.Size = 15f;
                code128.Baseline = 12;
                code128.BarHeight = 45f;
                code128.Code = "1244114424348394923";
                //code128.Code = "1244114424348394923";
                iTextSharp.text.Image image128 = code128.CreateImageWithBarcode(cd, null, null);
                //image128.SetDpi(300, 300);
                headerwidths = new float[] { 30, 30, 30 };
                aTable = new PdfPTable(headerwidths);
                r = new Rectangle(90, 0);
                aTable.SetWidthPercentage(headerwidths, r);
                ppcell = new PdfPCell(image128, false);
                ppcell.FixedHeight = 50;
                ppcell.BorderWidth = 0;
                //ppcell.BorderColor = ;
                ppcell.VerticalAlignment = Element.ALIGN_MIDDLE;
                aTable.AddCell(ppcell);


                tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));
                tdTmp.Padding = 8.0f;
                tdTmp.BorderWidth = 0;
                aTable.AddCell(tdTmp);

                #endregion

                #region 二维码
                ppcell = new PdfPCell(new Phrase(" ", fontFamily1_2));
                ppcell.FixedHeight = 50;
                ppcell.BorderWidth = 0;
                //ppcell.BorderColor = ;
                ppcell.VerticalAlignment = Element.ALIGN_MIDDLE;
                ppcell.HorizontalAlignment = Element.ALIGN_RIGHT;
                aTable.AddCell(ppcell);
                document.Add(aTable);
                #endregion

            }

            Paragraph p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 20.0f;
            p1.Add(new Phrase("绍兴市上虞区殡仪馆火化通知单", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 30.0f;
            p1.Add(new Phrase(" ", fontFamily1_1));
            document.Add(p1);

            float MinimumHeight = 25.0f;
            headerwidths = new float[] { 25, 20, 15, 15, 15, 15, 15 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(120, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("遗体姓名", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("性别", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("年龄", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadasdasdsa", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("证件号码", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("户籍地址", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsdasdsadsadas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("家庭住址", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);
            //string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3
            tdTmp = new PdfPCell(new Phrase("dsdsadsdsadas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 6;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("接运地址", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);
            //string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3
            tdTmp = new PdfPCell(new Phrase("dsdsadsdsadas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 6;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("火化炉型", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Rowspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("sdsadsadsdaas", fontFamily1_4));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2; tdTmp.Rowspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("火化日期", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsdsdsadassdas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("火化炉号", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" dsadas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("殡仪服务员签字", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = 50;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = 50;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("备注", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = 50;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsdas", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 4;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = 50;
            aTable.AddCell(tdTmp);
            document.Add(aTable);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 15.0f;
            p1.Add(new Phrase(" ", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase("  家属或被委托人签字：                          经办人：" + "dsdsadas", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_RIGHT;
            p1.Leading = 15.0f;
            p1.Add(new Phrase("dsadsadas", fontFamily1_3));
            document.Add(p1);

            document.Close();
            writer.Close();
        }

        /// <summary>
        /// 火化通知单
        /// </summary>
        public static void SixRunTime()
        {
            BaseFont fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            Font fontFamily1_1 = new Font(fontFamily1, 18, Font.BOLD);
            Font fontFamily1_2 = new Font(fontFamily1, 9, Font.BOLD);
            Font fontFamily1_3 = new Font(fontFamily1, 12, Font.BOLD);
            Font fontFamily1_4 = new Font(fontFamily1, 14, Font.BOLD);
            Font fontFamily1_5 = new Font(fontFamily1, 12, Font.UNDERLINE);
            Font fontFamily1_6 = new Font(fontFamily1, 16, Font.BOLD);
            string strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            //strFullFileName = "D:/PDF/One/火化通知单.pdf";
            Document document = new Document(PageSize.A4, 35, 30, 50, 0);
            PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            writer.InitialLeading = 30.0f;
            writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            document.Open();

            float[] headerwidths = new float[] { 10, 10 };
            PdfPTable aTable = new PdfPTable(headerwidths);
            Rectangle r = new Rectangle(20, 0);
            PdfPCell ppcell = new PdfPCell();
            PdfPCell tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));

            Paragraph p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 65.0f;
            p1.Add(new Phrase("  ", fontFamily1_1));
            document.Add(p1);



            float MinimumHeight = 33.0f;
            headerwidths = new float[] { 10, 20, 5, 10, 10, 10, 17, 30 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(120, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAA", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAA", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.DisableBorderSide(15);
            tdTmp.MinimumHeight = MinimumHeight;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAA", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAA", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);
            //string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3
            tdTmp = new PdfPCell(new Phrase("AAA", fontFamily1_3));
            tdTmp.Colspan = 3;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAA", fontFamily1_3));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAA", fontFamily1_3));
            tdTmp.Colspan = 3;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Colspan = 3;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("火化炉类型", fontFamily1_3));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("fULREG.REGDETAILADDRESS", fontFamily1_4));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("      " + "AAAAA", fontFamily1_6));
            tdTmp.Colspan = 8;
            tdTmp.Padding = 15.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_TOP;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = 70.0f;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            document.Add(aTable);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase(" ", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase("    ", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_RIGHT;
            p1.Leading = 35.0f;
            p1.Add(new Phrase(DateTime.Now.Year.ToString() + "      " + DateTime.Now.Month + "    " + DateTime.Now.Day + "      ", fontFamily1_3));
            document.Add(p1);


            p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 160.0f;
            p1.Add(new Phrase(" ", fontFamily1_1));
            document.Add(p1);


            headerwidths = new float[] { 10, 20, 5, 10, 10, 10, 17, 30 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(120, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAAAA", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAAAA", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAAAA", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAAAA", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);
            //string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3
            tdTmp = new PdfPCell(new Phrase("AAAAA", fontFamily1_3));
            tdTmp.Colspan = 3;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAAAA", fontFamily1_3));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        " + "AAAAA", fontFamily1_3));
            tdTmp.Colspan = 3;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            tdTmp.Colspan = 3;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("火化炉类型", fontFamily1_3));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("AAAAA", fontFamily1_4));
            tdTmp.Colspan = 2;
            tdTmp.Padding = 5.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.MinimumHeight = MinimumHeight;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("      " + "AAAAA", fontFamily1_6));
            tdTmp.Colspan = 8;
            tdTmp.Padding = 15.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_TOP;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.MinimumHeight = 70.0f;
            tdTmp.DisableBorderSide(15);
            aTable.AddCell(tdTmp);

            document.Add(aTable);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase(" ", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase("    ", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_RIGHT;
            p1.Leading = 30.0f;
            p1.Add(new Phrase(DateTime.Now.Year.ToString() + "      " + DateTime.Now.Month + "    " + DateTime.Now.Day + "      ", fontFamily1_3));
            document.Add(p1);

            document.Close();
            writer.Close();


            #region
            //BaseFont fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            //Font fontFamily1_1 = new Font(fontFamily1, 18, Font.BOLD);
            //Font fontFamily1_2 = new Font(fontFamily1, 9, Font.BOLD);
            //Font fontFamily1_3 = new Font(fontFamily1, 12, Font.BOLD);
            //Font fontFamily1_4 = new Font(fontFamily1, 14, Font.BOLD);
            //Font fontFamily1_5 = new Font(fontFamily1, 12, Font.UNDERLINE);
            //Font fontFamily1_6 = new Font(fontFamily1, 16, Font.BOLD);
            //string strFullFileName = PubFunTemp.CreateWebFileFullName(pkgTrn.InClientInfo.CompanyName + "火化通知单.pdf");
            ////strFullFileName = "D:/PDF/One/火化通知单.pdf";
            //Document document = new Document(PageSize.A4, 35, 30, 50, 0);
            //PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            //writer.InitialLeading = 30.0f;
            //writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            //document.Open();

            //float[] headerwidths = new float[] { 10, 10 };
            //PdfPTable aTable = new PdfPTable(headerwidths);
            //Rectangle r = new Rectangle(20, 0);
            //PdfPCell ppcell = new PdfPCell();
            //PdfPCell tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));

            //Paragraph p1 = new Paragraph();
            //p1.Alignment = Element.TITLE;
            //p1.Leading = 65.0f;
            //p1.Add(new Phrase("  ", fontFamily1_1));
            //document.Add(p1);



            //float MinimumHeight = 33.0f;
            //headerwidths = new float[] { 10, 20, 5, 10, 10, 10, 17, 30 };
            //aTable = new PdfPTable(headerwidths);
            //r = new Rectangle(120, 0);
            //aTable.SetWidthPercentage(headerwidths, r);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(fULREG.REGNAME, fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("    ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(string.IsNullOrEmpty(fULREG.REGSEX) ? "" : FunCache.Code.GetDesc(fULREG.REGSEX, FunConstant.Code.XBLX), fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("    ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.DisableBorderSide(15);
            //tdTmp.MinimumHeight = MinimumHeight;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(fULREG.REGAGE.IsNull() || fULREG.REGAGE.Equals(0) ? "" : fULREG.REGAGE.ToString(), fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(string.IsNullOrEmpty(fULREG.REGHOUSEHOLD) ? "" : FunCache.Household.GetDesc(fULREG.REGHOUSEHOLD), fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);
            ////string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3
            //tdTmp = new PdfPCell(new Phrase(string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3));
            //tdTmp.Colspan = 3;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(fULREG.REGDETAILADDRESS, fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        " + PubFunDateTime.DateClass.DbToDispH(fULREG.REGCREMATIONDATE), fontFamily1_3));
            //tdTmp.Colspan = 3;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            //tdTmp.Colspan = 3;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("火化炉类型", fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(FunCache.Code.GetDesc(fULREG.REGCRETYPE, FunConstant.Code.HHLLX), fontFamily1_4));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("      " + fULREG.REGREMARK, fontFamily1_6));
            //tdTmp.Colspan = 8;
            //tdTmp.Padding = 15.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_TOP;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = 70.0f;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //document.Add(aTable);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_LEFT;
            //p1.Leading = 10.0f;
            //p1.Add(new Phrase(" ", fontFamily1_3));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_LEFT;
            //p1.Leading = 10.0f;
            //p1.Add(new Phrase("    ", fontFamily1_3));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_RIGHT;
            //p1.Leading = 35.0f;
            //p1.Add(new Phrase(DateTime.Now.Year.ToString() + "      " + DateTime.Now.Month + "    " + DateTime.Now.Day + "      ", fontFamily1_3));
            //document.Add(p1);


            //p1 = new Paragraph();
            //p1.Alignment = Element.TITLE;
            //p1.Leading = 160.0f;
            //p1.Add(new Phrase(" ", fontFamily1_1));
            //document.Add(p1);


            //headerwidths = new float[] { 10, 20, 5, 10, 10, 10, 17, 30 };
            //aTable = new PdfPTable(headerwidths);
            //r = new Rectangle(120, 0);
            //aTable.SetWidthPercentage(headerwidths, r);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(fULREG.REGNAME, fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("    ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(string.IsNullOrEmpty(fULREG.REGSEX) ? "" : FunCache.Code.GetDesc(fULREG.REGSEX, FunConstant.Code.XBLX), fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("    ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(fULREG.REGAGE.IsNull() || fULREG.REGAGE.Equals(0) ? "" : fULREG.REGAGE.ToString(), fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(string.IsNullOrEmpty(fULREG.REGHOUSEHOLD) ? "" : FunCache.Household.GetDesc(fULREG.REGHOUSEHOLD), fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);
            ////string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3
            //tdTmp = new PdfPCell(new Phrase(string.IsNullOrEmpty(fULREG.Cdh.CDHADDRESS) ? "" : fULREG.Cdh.CDHADDRESS, fontFamily1_3));
            //tdTmp.Colspan = 3;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f; tdTmp.Colspan = 2;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(fULREG.REGDETAILADDRESS, fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        " + PubFunDateTime.DateClass.DbToDispH(fULREG.REGCREMATIONDATE), fontFamily1_3));
            //tdTmp.Colspan = 3;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("        ", fontFamily1_3));
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_3));
            //tdTmp.Colspan = 3;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("火化炉类型", fontFamily1_3));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase(FunCache.Code.GetDesc(fULREG.REGCRETYPE, FunConstant.Code.HHLLX), fontFamily1_4));
            //tdTmp.Colspan = 2;
            //tdTmp.Padding = 5.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //tdTmp.MinimumHeight = MinimumHeight;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("      " + fULREG.REGREMARK, fontFamily1_6));
            //tdTmp.Colspan = 8;
            //tdTmp.Padding = 15.0f;
            //tdTmp.VerticalAlignment = Element.ALIGN_TOP;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //tdTmp.MinimumHeight = 70.0f;
            //tdTmp.DisableBorderSide(15);
            //aTable.AddCell(tdTmp);

            //document.Add(aTable);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_LEFT;
            //p1.Leading = 10.0f;
            //p1.Add(new Phrase(" ", fontFamily1_3));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_LEFT;
            //p1.Leading = 10.0f;
            //p1.Add(new Phrase("    ", fontFamily1_3));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_RIGHT;
            //p1.Leading = 30.0f;
            //p1.Add(new Phrase(DateTime.Now.Year.ToString() + "      " + DateTime.Now.Month + "    " + DateTime.Now.Day + "      ", fontFamily1_3));
            //document.Add(p1);

            //document.Close();
            //writer.Close();
            #endregion
        }


        /// <summary>
        /// RunTime
        /// </summary>
        public static void RunTimeShow()
        {
            string strFullFileName = string.Empty;
            BaseFont fontFamily1;
            Font fontFamily1_1;
            Font fontFamily1_2;
            Font fontFamily1_3;
            Font fontFamily1_4;
            Font fontFamily1_5;
            Font fontFamily1_6;
            Font fontFamily1_7;
            Paragraph p1;
            float[] headerwidths;
            PdfPTable aTable;
            Rectangle r;
            PdfPCell tdTmp;
            Document document;
            PdfWriter writer;
            Rectangle pageSize;

            #region 上虞   旧版
            fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simhei.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            fontFamily1_1 = new Font(fontFamily1, 16, Font.BOLD);
            fontFamily1_2 = new Font(fontFamily1, 10);
            fontFamily1_3 = new Font(fontFamily1, 10, Font.BOLD);
            fontFamily1_4 = new Font(fontFamily1, 12);
            fontFamily1_5 = new Font(fontFamily1, 12, Font.BOLD);
            strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            pageSize = new Rectangle(350, 580);
            document = new Document(PageSize.A4, 20, 230, 20, 250);
            writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            writer.InitialLeading = 30.0f;
            writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            document.Open();
            #region 第一联
            p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 20.0f;
            p1.Add(new Phrase("收费清单", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase(" ", fontFamily1_4));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase(" ", fontFamily1_4));
            document.Add(p1);

            headerwidths = new float[] { 5, 45, 5, 8, 7, 15, 15 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(100, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("序号", fontFamily1_2));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("费用名称", fontFamily1_2));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("单位", fontFamily1_2));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("费用单价", fontFamily1_2));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("数量", fontFamily1_2));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("减免金额", fontFamily1_2));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("实收金额", fontFamily1_2));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);
            #endregion

            #region 第二联
            int i = 0;

            i += 1;
            tdTmp = new PdfPCell(new Phrase(i.ToString(), fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("基本收费合计", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);


            tdTmp = new PdfPCell(new Phrase("123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);


            i += 1;
            tdTmp = new PdfPCell(new Phrase(i.ToString(), fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("延伸收费合计", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            aTable.AddCell(tdTmp);

            for (int j = 0; j < 3; j++)
            {
                tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));
                tdTmp.Padding = 2.0f; tdTmp.Colspan = 2;
                tdTmp.MinimumHeight = 15.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_2));
                tdTmp.Padding = 2.0f;
                tdTmp.MinimumHeight = 15.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_2));
                tdTmp.Padding = 2.0f;
                tdTmp.MinimumHeight = 15.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_2));
                tdTmp.Padding = 2.0f;
                tdTmp.MinimumHeight = 15.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_2));
                tdTmp.Padding = 2.0f;
                tdTmp.MinimumHeight = 15.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);

                tdTmp = new PdfPCell(new Phrase(" ", fontFamily1_2));
                tdTmp.Padding = 2.0f;
                tdTmp.MinimumHeight = 15.0f;
                tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
                tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
                aTable.AddCell(tdTmp);
            }

            document.Add(aTable);
            #endregion

            #region 第三联
            headerwidths = new float[] { 35, 35, 30 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(100, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("应收：" + "123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            tdTmp.DisableBorderSide(9);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("减免：" + "123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            tdTmp.DisableBorderSide(13);
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("实收：" + "123", fontFamily1_5));
            tdTmp.Padding = 2.0f;
            tdTmp.MinimumHeight = 20.0f;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_RIGHT;
            tdTmp.DisableBorderSide(5);
            aTable.AddCell(tdTmp);
            document.Add(aTable);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_RIGHT;
            p1.Leading = 20.0f;
            p1.Add(new Phrase("经办：" + "123", fontFamily1_2));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 12.0f;
            p1.Add(new Phrase("核实后，家属同意以上服务收费签字：", fontFamily1_2));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 12.0f;
            p1.Add(new Phrase("温馨提示：凭此联清单及相应发票领取骨灰。", fontFamily1_2));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 12.0f;
            p1.Add(new Phrase("领灰同时，及时要求领灰处工作人员开具火化证明。", fontFamily1_2));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 12.0f;
            p1.Add(new Phrase("火化证明请妥善保管，遗失不补。", fontFamily1_2));
            document.Add(p1);
            #endregion
            document.Close();
            writer.Close();
            #endregion
        }



        public static void JieCheDan()
        {
            BaseFont fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            Font fontFamily1_1 = new Font(fontFamily1, 22, Font.NORMAL);
            Font fontFamily1_2 = new Font(fontFamily1, 9, Font.BOLD);
            Font fontFamily1_3 = new Font(fontFamily1, 13, Font.NORMAL);
            Font fontFamily1_4 = new Font(fontFamily1, 12, Font.NORMAL);
            Font fontFamily1_5 = new Font(fontFamily1, 12, Font.UNDERLINE);
            Font fontFamily1_6 = new Font(fontFamily1, 16, Font.BOLD);

            float MinimumHeight = 25.0f;
            float fMinimumHeight = 18;

            float[] headerwidths = null;
            PdfPTable aTable = null;
            Rectangle r = null;
            PdfPCell ppcell = null;
            PdfPCell tdTmp = null;
            Paragraph p1 = new Paragraph();

            string strFullFileName = "";

            fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            fontFamily1_1 = new Font(fontFamily1, 16, Font.BOLD);
            fontFamily1_2 = new Font(fontFamily1, 10);
            fontFamily1_3 = new Font(fontFamily1, 12, Font.BOLD);
            fontFamily1_4 = new Font(fontFamily1, 11);
            fontFamily1_5 = new Font(fontFamily1, 12, Font.UNDERLINE);
            fMinimumHeight = 18;


            strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            //Document document = new Document(PageSize.A4, 20, 20, 20, 421); new RectangleReadOnly(420f, 595f)
            Document document = new Document(new RectangleReadOnly(595f, 420f), 20, 20, 20, 20);
            PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            writer.InitialLeading = 30.0f;
            writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            document.Open();

            #region 接车单 
            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_CENTER;
            p1.Leading = 10.0f;
            p1.Add(new Phrase("" + "上虞" + "接运单", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 10.0f;
            p1.Add(new Phrase("                    ", fontFamily1_2));
            document.Add(p1);

            if (true)
            {
                #region 条形码
                PdfContentByte cd = writer.DirectContent;
                Barcode128 code128 = new Barcode128();
                code128.X = 2f;
                code128.N = 2f;
                code128.Size = 20f;
                code128.Baseline = 20;
                code128.BarHeight = 40f;
                code128.Code = "12345678910123456";

                iTextSharp.text.Image image128 = code128.CreateImageWithBarcode(cd, null, null);
                //image128.SetDpi(300, 300);
                headerwidths = new float[] { 120 };
                aTable = new PdfPTable(headerwidths);
                r = new Rectangle(120, 0);
                aTable.SetWidthPercentage(headerwidths, r);

                tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));
                tdTmp.Padding = 10.0f;
                tdTmp.BorderWidth = 0;
                aTable.AddCell(tdTmp);

                ppcell = new PdfPCell(image128, false);
                ppcell.FixedHeight = 40;
                ppcell.BorderWidth = 0;
                ppcell.HorizontalAlignment = Element.ALIGN_CENTER;
                ppcell.VerticalAlignment = Element.ALIGN_MIDDLE;
                aTable.AddCell(ppcell);
                document.Add(aTable);
                #endregion
            }

            headerwidths = new float[] { 20, 20, 20, 20, 20, 20 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(120, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("逝者姓名", fontFamily1_2));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadsa", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("性别", fontFamily1_2));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("123456", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("年龄", fontFamily1_2));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsad", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("死亡日期", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsdsasdas", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("死亡原因", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadsadsa", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 3;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系人1", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsdasdas", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系人1电话", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsad", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 3;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系人2", fontFamily1_2));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsdsadsadsa", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系人2电话", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadas", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 3;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("接尸时间", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadsadas", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("接尸地址", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadasd", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("驾驶员", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsadasd", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("车牌号", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dsaadsadas", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("公里数", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dasdasd", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("dasdsadas", fontFamily1_2));
            tdTmp.Padding = 3.0f; tdTmp.MinimumHeight = 30;
            tdTmp.Colspan = 6;
            tdTmp.VerticalAlignment = Element.ALIGN_CENTER;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);
            document.Add(aTable);
            #endregion

            document.Close();
            writer.Close();

            #region 接车单
            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_CENTER;
            //p1.Leading = 10.0f;
            //p1.Add(new Phrase("" + "上虞" + "接运单", fontFamily1_1));
            //document.Add(p1);

            //p1 = new Paragraph();
            //p1.Alignment = Element.ALIGN_LEFT;
            //p1.Leading = 10.0f;
            //p1.Add(new Phrase("                    ", fontFamily1_2));
            //document.Add(p1);

            //if (true)
            //{
            //    #region 条形码
            //    PdfContentByte cd = writer.DirectContent;
            //    Barcode128 code128 = new Barcode128();
            //    code128.X = 2f;
            //    code128.N = 2f;
            //    code128.Size = 20f;
            //    code128.Baseline = 20;
            //    code128.BarHeight = 40f;
            //    code128.Code = "12345678910123456";

            //    iTextSharp.text.Image image128 = code128.CreateImageWithBarcode(cd, null, null);
            //    //image128.SetDpi(300, 300);
            //    headerwidths = new float[] { 120 };
            //    aTable = new PdfPTable(headerwidths);
            //    r = new Rectangle(120, 0);
            //    aTable.SetWidthPercentage(headerwidths, r);

            //    tdTmp = new PdfPCell(new Phrase("", fontFamily1_2));
            //    tdTmp.Padding = 10.0f;
            //    tdTmp.BorderWidth = 0;
            //    aTable.AddCell(tdTmp);

            //    ppcell = new PdfPCell(image128, false);
            //    ppcell.FixedHeight = 40;
            //    ppcell.BorderWidth = 0;
            //    ppcell.HorizontalAlignment = Element.ALIGN_CENTER;
            //    ppcell.VerticalAlignment = Element.ALIGN_MIDDLE;
            //    aTable.AddCell(ppcell);
            //    document.Add(aTable);
            //    #endregion
            //}

            //headerwidths = new float[] { 20, 20, 20, 20, 20, 20 };
            //aTable = new PdfPTable(headerwidths);
            //r = new Rectangle(120, 0);
            //aTable.SetWidthPercentage(headerwidths, r);

            //tdTmp = new PdfPCell(new Phrase("逝者姓名", fontFamily1_2));
            //tdTmp.Padding = 1.0f;
            //tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadsadsa", fontFamily1_3));
            //tdTmp.Padding = 1.0f;
            //tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("性别", fontFamily1_2));
            //tdTmp.Padding = 1.0f;
            //tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("123456", fontFamily1_3));
            //tdTmp.Padding = 1.0f;
            //tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("年龄", fontFamily1_2));
            //tdTmp.Padding = 1.0f;
            //tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadsad", fontFamily1_3));
            //tdTmp.Padding = 1.0f;
            //tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("死亡日期", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadsdsasdas", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("死亡原因", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadsadsadsa", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.Colspan = 3;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("联系人1", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsdasdas", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("联系人1电话", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadsad", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.Colspan = 3;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("联系人2", fontFamily1_2));
            //tdTmp.Padding = 1.0f;
            //tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsdsadsadsa", fontFamily1_3));
            //tdTmp.Padding = 1.0f;
            //tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("联系人2电话", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadsadas", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.Colspan = 3;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("接尸时间", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadsadas", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.Colspan = 5;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("接尸地址", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadasd", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.Colspan = 5;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("驾驶员", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsadasd", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("车牌号", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dsaadsadas", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("公里数", fontFamily1_2));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dasdasd", fontFamily1_3));
            //tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            //tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            //tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            //aTable.AddCell(tdTmp);

            //tdTmp = new PdfPCell(new Phrase("dasdsadas", fontFamily1_2));
            //tdTmp.Padding = 3.0f; tdTmp.MinimumHeight = 30;
            //tdTmp.Colspan = 6;
            //tdTmp.VerticalAlignment = Element.ALIGN_CENTER;
            //tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            //aTable.AddCell(tdTmp);
            //document.Add(aTable);
            #endregion
        }

        /// <summary>
        /// 打印联办单
        /// </summary>
        public static void LianBanDan() 
        {
            BaseFont fontFamily1;
            Font fontFamily1_1;
            Font fontFamily1_2;
            Font fontFamily1_3;
            Font fontFamily1_5;
            Font fontFamily1_4;
            float floatMinimumHeight_1;
            float floatMinimumHeight_2;
            float floatMinimumHeight_3;
            string strFullFileName = string.Empty;
            Paragraph p1;
            float[] headerwidths;
            PdfPTable aTable;
            Rectangle r;
            PdfPCell tdTmp;
            Document document;
            PdfWriter writer;

            fontFamily1 = BaseFont.CreateFont(Environment.GetFolderPath(Environment.SpecialFolder.Fonts) + "\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            fontFamily1_1 = new Font(fontFamily1, 20, Font.BOLD);
            fontFamily1_2 = new Font(fontFamily1, 14, Font.BOLD);
            fontFamily1_3 = new Font(fontFamily1, 12);
            fontFamily1_5 = new Font(fontFamily1, 12, Font.BOLD);
            strFullFileName = $"D:/PDF/One/{Guid.NewGuid()}.pdf";
            document = new Document(PageSize.A4, 55, 55, 20, 5);
            writer = PdfWriter.GetInstance(document, new FileStream(strFullFileName, FileMode.Create));
            writer.InitialLeading = 30.0f;
            writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
            document.Open();

            p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 20.0f;
            p1.Add(new Phrase(" ", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 20.0f;
            p1.Add(new Phrase("死亡关联事项联办申报单", fontFamily1_1));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.TITLE;
            p1.Leading = 25.0f;
            p1.Add(new Phrase(" ", fontFamily1_1));
            document.Add(p1);

            headerwidths = new float[] { 20, 20, 20, 20, 20, 30 };
            aTable = new PdfPTable(headerwidths);
            r = new Rectangle(130, 0);
            aTable.SetWidthPercentage(headerwidths, r);

            tdTmp = new PdfPCell(new Phrase("逝者姓名", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("性别", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("身份证号码", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("户籍所在地", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 30;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 30;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("死亡原因", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 30;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 30;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("死亡日期", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 30;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f;
            tdTmp.MinimumHeight = 30;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("申请人姓名", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("与死者关系", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("身份证号码", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("邮寄地址", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Colspan = 3;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("联系电话", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("申请         办理      事项", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Rowspan = 10; tdTmp.DisableBorderSide(2);
            tdTmp.VerticalAlignment = Element.ALIGN_BOTTOM;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("★□ 死亡人员 《居民死亡医学证明（推断）书》 办理", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("★□ 火化手续的办理", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("★  骨灰处理方式：□树葬 □撒散 □海葬 □骨灰存放堂", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    骨灰安放去向___________________________________ ", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("★□ 死亡人员的户口注销（告知：公民死亡的，应当在一个月内，由户主、", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("亲属、村（居）委会向户口所在地公安户籍窗口申报死亡登记，注销户口：", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("死亡后一个月内仍未注销的，公安机关将依职权注销死亡人员户口。）", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("★□死亡人员医疗保险事项办理", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  □医疗保险关系终止  □个人账户余额清算", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("★□死亡或被宣告死亡人员提取住房公积金（有公积金的请打勾）", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("（请在需申请的事项方框内打“√”）", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Rowspan = 10; tdTmp.DisableBorderSide(1);
            tdTmp.VerticalAlignment = Element.ALIGN_TOP;
            tdTmp.HorizontalAlignment = Element.ALIGN_CENTER;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("★ 职工基本养老保险、城乡居民基本养老保险在职、退休死亡终止相关待遇", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("勾选其中一项：", fontFamily1_5));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  □ 达到法定退休年龄前终止职工基本养老保险关系待遇核准支付", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  □ 离退休人员死亡待遇核准支付", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("  □ 城乡居民参保关系注销人员待遇核准支付", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    继承人同意将死亡人员丧葬补助金、抚恤金、养老保险个账余额、医疗", fontFamily1_5));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("个账等费用汇入以下账户并自行分配，如遇当年调整基本养老金，补发养老", fontFamily1_5));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("金发放至该账户，请勿过早注销该账户（发放明细由平台短信通知申领人）：", fontFamily1_5));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    □ 死者养老金发放账户", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    □ 死者其它银行卡，卡号：" + "xxxxxx" + ",开户银行：" + "xxxxxx", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("申请人承诺", fontFamily1_2));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.Rowspan = 3;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("    申请人承诺遵守国家和地方各项法律法规，已知晓全部告知内容，", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(2); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("以上填报信息真实有效，并对真实性负责，因申请人虚假填报信息产生的法", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(3); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);

            tdTmp = new PdfPCell(new Phrase("律纠纷由申请人自行承担。", fontFamily1_3));
            tdTmp.Padding = 1.0f; tdTmp.MinimumHeight = 22;
            tdTmp.DisableBorderSide(1); tdTmp.Colspan = 5;
            tdTmp.VerticalAlignment = Element.ALIGN_MIDDLE;
            tdTmp.HorizontalAlignment = Element.ALIGN_LEFT;
            aTable.AddCell(tdTmp);
            document.Add(aTable);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 20.0f;
            p1.Add(new Phrase("  ", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 20.0f;
            p1.Add(new Phrase("    申请人签名：_____________ " + "                                     经办人：" + "xxxxxx", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 15.0f;
            p1.Add(new Phrase("    ", fontFamily1_3));
            document.Add(p1);

            p1 = new Paragraph();
            p1.Alignment = Element.ALIGN_LEFT;
            p1.Leading = 20.0f;
            p1.Add(new Phrase("    申请日期：" + "xxxx" + "                                       日  期：" + "xxxx", fontFamily1_3));
            document.Add(p1);
            document.Close();
            writer.Close();

            //$"c:/users/zdf/desktop/pdf/pdf/殡仪馆火化章.png";
        }
    }
}
